﻿using StarPizza.Model.User;
using StarPizza.ViewModel.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StarPizza.ViewModel.ClientSystem
{
    class ClientSystemVM : SubsystemVM
    {
        ClientDataEditor clientDataEditor;
        public ClientSystemVM(UserSpace userSpace, ClientDataEditor clientDataEditor,
            DoughLister doughLister, PizzaSelector pizzaSelector, CustomPizzaOrderer customPizzaOrderer, Cart cart)
            : base(userSpace)
        {
            this.clientDataEditor = clientDataEditor;

            this.doughLister = doughLister;
            this.pizzaSelector = pizzaSelector;
            this.customPizzaOrderer = customPizzaOrderer;
            this.cart = cart;
        }
        protected override bool ShouldBeVisible(UserMode userMode)
        {
            return userMode == UserMode.Client;
        }
        public void EditClientData()
        {
            clientDataEditor.IsVisible = true;
        }

        private DoughLister doughLister;
        public DoughLister DoughLister { get { return doughLister; } }
        
        private PizzaSelector pizzaSelector;
        public PizzaSelector PizzaSelector { get { return pizzaSelector; } }

        private CustomPizzaOrderer customPizzaOrderer;
        public CustomPizzaOrderer CustomPizzaOrderer { get { return customPizzaOrderer; } }

        private Cart cart;
        public Cart Cart { get { return cart; } }
    }
}
